package org.vacoor.ticket.handler.impl;

import java.io.UnsupportedEncodingException;

import org.vacoor.ticket.Constant;
import org.vacoor.ticket.handler.ResultHandler;
/**
 * 一个简单的处理器,将结果转换为字符串返回
 * @author vacoor
 *
 */
public class SimpleHandler implements ResultHandler<String>{

	@Override
	public String handler(byte[] content) {
		String result;
		try {
			result = new String(content,Constant.ENCODING);
		} catch (UnsupportedEncodingException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
			result = new String(content);
		}
		return result;
	}

}
